import { createStore, applyMiddleware } from 'redux'
import rootReducer from './reducer' 
// 处理异步action 要用thunk 和 applyMiddleware  用 applyMiddleware 包裹 要用thunk
import thunk from 'redux-thunk'
// 调试reduc 数据  
import { composeWithDevTools } from 'redux-devtools-extension'
// const middlewares = composeWithDevTools(applyMiddleware(thunk))

const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)))
export default store